<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <% if(user){ %>
    <nav>
        <h3><%=user.loginname%>已登录</h3>
        <a href="/users/logout">logout</a>
    </nav>

    <form class="" action="users/update_pwd" method="post">
      <input type="text" name="loginname" placeholder="userame" value=""><br>
      <input type="password" name="password" placeholder="password" value=""><br>
      <input type="submit" name="" value="update">
    </form>
    <%} else{%>

      <form class="" action="/users/login" method="post">
        <input type="text" name="loginname" placeholder="username" value=""><br>
        <input type="password" name="password" placeholder="password" value=""><br>
        <%=firstnum%>+<%=secondnum%>=<input type="text" name="vnum" value=""><br>
        <input type="submit" name="" value="login">
      </form>

      <form class="" action="/users/register" method="post">
        <input type="text" name="loginname" placeholder="username" value=""><br>
        <input type="password" name="password" placeholder="password" value=""><br>
        <input type="password" name="confirm" placeholder="password" value=""><br>
        <img src="/users/vimg" alt=""><input type="text" name="vimg" value=""><br>
        <input type="submit" name="" value="register">
      </form>
    <%}%>

  </body>
</html>
